package nl.boektrust.btsoep.shared.model;

public enum ProductFormCode {
	UNDEFINED,HARDCOVER,PAPERBACK,
	AUDIO,AUDIOCASSETTE,CDAUDIO,DAT,AUDIODISC,AUDIOTAPE,MINIDISC
,BOOK		
,LOOSELEAF
,SPIRALBOUND
,PAMPHLET
,LEATHER
,BOARDBOOK
,RAGBOOK
,BATHBOOK
,NOVELTYBOOK
,SLIDEBOUND
,BIGBOOK
,FOAMBOOK
,OTHERBOOKFORMAT
,SHEETMAP
,SHEETMAPFOLDED
,SHEETMAPFLAT
,SHEETMAPROLLED
,GLOBE
,OTHERCARTOGRAPHIC
,DIGITAL
,CDROM
,CDI
,GAMECARTRIDGE
,DISKETTE
,DVDROM
,SDCARD
,COMPACTFLASH
,MEMORYSTICK
,USBFLASHDRIVE
,DSCDDVD
,OTHERDIGITAL
,DIGITALDELIVERED
,DIGITALDOWNLOADANDONLINE
,DIGITALONLINE
,DIGITALDOWNLOAD
,MISCELLANEOUSPRINT
,ADDRESSBOOK
,CALENDAR
,CARDS
,COPYMASTERS
,DIARY
,FRIEZE
,KIT
,SHEETMUSIC
,POSTCARDBOOK
,POSTER
,RECORDBOOK
,FOLDER
,PHOTOGRAPHS
,WALLCHART
,STICKERS
,PLATE
,NOTEBOOK
,ORGANIZER
,BOOKMARK
,OTHERPRINTED
,DVDVIDEO
,BLURAYVIDEO
,OTHERVIDEO
,TRADEONLYMATERIAL
,DUMPBINEMPTY
,DUMPBINFILLED
,COUNTERPACKEMPTY
,COUNTERPACKFILLED
,POSTERPROMOTIONAL
,SHELFSTRIP
,WINDOWPIECE
,STREAMER
,SPINNER
,LARGEBOOKDISPLAY
,SHRINKWRAPPEDPACK
,OTHERPOINTOFSALE
,GENERALMERCHANDISE
,DOLL
,SOFTTOY
,TOY
,GAME
,TSHIRT
,OTHERMERCHANDISE;
	
	public static String stringValue(ProductFormCode t) {
		String value = new String();
		switch (t) {
		case UNDEFINED: value = "Onbekend"; break;
		case HARDCOVER: value = "Hardcover"; break;
		case PAPERBACK: value = "Paperback"; break;
		}
		return value;
		
	}
	
	public static ProductFormCode parseStringIntoProductFormCode(String s) {
		for (ProductFormCode t : ProductFormCode.values()) {
			if (ProductFormCode.stringValue(t).equals(s) == true) return t;
		}
		return UNDEFINED;
	}
	
	public static ProductFormCode parseOnixStringIntoProductFormCode(String s) {
		for (ProductFormCode t : ProductFormCode.values()) {
			if (ProductFormCode.stringValueForOnix(t).equals(s) == true) return t;
		}
		return UNDEFINED;
	}
	
	public static String stringValueForOnix(ProductFormCode t) {
		String value = new String();
		if (t == null) {
			System.err.println("URLReferenceType.stringValueForOnix() was called with a null argument");
			return "00";
		}
		switch (t) {
		case UNDEFINED: value = "00"; break;
		case AUDIO: 		value = "AA"; break;
		case AUDIOCASSETTE: value = "AB"; break;
		case CDAUDIO: 		value = "AC"; break;
		case DAT: 			value = "AD"; break;
		case AUDIODISC: 	value = "AE"; break;
		case AUDIOTAPE: 	value = "AF"; break;
		case MINIDISC: 		value = "AG"; break;
		case BOOK		: 	value = "BA"; break;
		case HARDCOVER: 	value = "BB"; break;
		case PAPERBACK: 	value = "BC"; break;
		case LOOSELEAF: 	value = "BD"; break;
		case SPIRALBOUND: 	value = "BE"; break;
		case PAMPHLET: 		value = "BF"; break;
		case LEATHER: 		value = "BG"; break;
		case BOARDBOOK: 	value = "BH"; break;
		case RAGBOOK: 		value = "BI"; break;
		case BATHBOOK: 		value = "BJ"; break;
		case NOVELTYBOOK: 	value = "BK"; break;
		case SLIDEBOUND: 	value = "BL"; break;
		case BIGBOOK: 		value = "BM"; break;
		case FOAMBOOK: 		value = "BP"; break;
		case OTHERBOOKFORMAT: 	value = "BZ"; break;
		case SHEETMAP: 		value = "CA"; break;
		case SHEETMAPFOLDED: 	value = "CB"; break;
		case SHEETMAPFLAT: 	value = "CC"; break;
		case SHEETMAPROLLED: 	value = "CD"; break;
		case GLOBE: 		value = "CE"; break;
		case OTHERCARTOGRAPHIC: 	value = "CZ"; break;
		case DIGITAL: 		value = "DA"; break;
		case CDROM: 		value = "CB"; break;
		case CDI: 			value = "DC"; break;
		case GAMECARTRIDGE: value = "DE"; break;
		case DISKETTE: 		value = "DF"; break;
		case DVDROM: 		value = "DI"; break;
		case SDCARD: 		value = "DJ"; break;
		case COMPACTFLASH: 	value = "DK"; break;
		case MEMORYSTICK: 	value = "DL"; break;
		case USBFLASHDRIVE: value = "DM"; break;
		case DSCDDVD: 		value = "DN"; break;
		case OTHERDIGITAL: 	value = "DZ"; break;
		case DIGITALDELIVERED: 	value = "EA"; break;
		case DIGITALDOWNLOADANDONLINE: 	value = "EB"; break;
		case DIGITALONLINE: 	value = "EC"; break;
		case DIGITALDOWNLOAD: 	value = "ED"; break;
		case MISCELLANEOUSPRINT: 	value = "PA"; break;
		case ADDRESSBOOK: 	value = "PB"; break;
		case CALENDAR: 		value = "PC"; break;
		case CARDS: 		value = "PD"; break;
		case COPYMASTERS: 	value = "PE"; break;
		case DIARY: 		value = "PF"; break;
		case FRIEZE: 		value = "PG"; break;
		case KIT: 			value = "PH"; break;
		case SHEETMUSIC: 	value = "PI"; break;
		case POSTCARDBOOK: 	value = "PJ"; break;
		case POSTER: 		value = "PK"; break;
		case RECORDBOOK: 	value = "PL"; break;
		case FOLDER: 		value = "PM"; break;
		case PHOTOGRAPHS: 	value = "PN"; break;
		case WALLCHART: 	value = "PO"; break;
		case STICKERS: 		value = "PP"; break;
		case PLATE: 		value = "PQ"; break;
		case NOTEBOOK: 		value = "PR"; break;
		case ORGANIZER: 	value = "PS"; break;
		case BOOKMARK: 		value = "PT"; break;
		case OTHERPRINTED: 	value = "PZ"; break;
		case DVDVIDEO: 		value = "VI"; break;
		case BLURAYVIDEO: 	value = "VO"; break;
		case OTHERVIDEO: 	value = "VZ"; break;
		case TRADEONLYMATERIAL: 	value = "XA"; break;
		case DUMPBINEMPTY: 	value = "XB"; break;
		case DUMPBINFILLED: value = "XC"; break;
		case COUNTERPACKEMPTY: 	value = "XD"; break;
		case COUNTERPACKFILLED: 	value = "XE"; break;
		case POSTERPROMOTIONAL: 	value = "XF"; break;
		case SHELFSTRIP: 	value = "XG"; break;
		case WINDOWPIECE: 	value = "XH"; break;
		case STREAMER: 		value = "XI"; break;
		case SPINNER: 		value = "XJ"; break;
		case LARGEBOOKDISPLAY: 	value = "XK"; break;
		case SHRINKWRAPPEDPACK: value = "XL"; break;
		case OTHERPOINTOFSALE: 	value = "XZ"; break;
		case GENERALMERCHANDISE: value = "ZA"; break;
		case DOLL: 			value = "ZB"; break;
		case SOFTTOY: 		value = "ZC"; break;
		case TOY: 			value = "ZD"; break;
		case GAME: 			value = "ZE"; break;
		case TSHIRT: 		value = "ZF"; break;
		case OTHERMERCHANDISE: 	value = "ZZ"; break;

		}
		return value;
		
	}
}
